const TOKEN_KEY = 'token'
const REFRESH_TOKEN_KEY = 'refresh_token'
// setToken作用：将token存储到localStorage中
export const setToken = (token,refreshToken) =>{
  localStorage.setItem(TOKEN_KEY, token)
  localStorage.setItem(REFRESH_TOKEN_KEY, refreshToken)
}
// getToken作用：从localStorage中获取token
export const getToken = () =>{
  return localStorage.getItem(TOKEN_KEY)
}
// getRefreshToken作用：从localStorage中获取refreshToken
export const getRefreshToken = () =>{
  return localStorage.getItem(REFRESH_TOKEN_KEY)
}
//removeToken作用：从localStorage中删除token和refreshToken
export const removeToken = () =>{
  localStorage.removeItem(TOKEN_KEY)
  localStorage.removeItem(REFRESH_TOKEN_KEY)
}
